//
//  LLT_PlayerAlwaysUseHeroViewCell_LXM.m
//  CoderLLT
//
//  Created by 刘晓萌 on 15/12/15.
//  Copyright © 2015年 刘晓萌. All rights reserved.
//

#import "LLT_PlayerAlwaysUseHeroViewCell_LXM.h"
#import "LLT_PlayerLastUsedModel.h"
#import "UIImageView+WebCache.h"
@interface LLT_PlayerAlwaysUseHeroViewCell_LXM ()

@property (weak, nonatomic) IBOutlet UIImageView *img1;
@property (weak, nonatomic) IBOutlet UIImageView *image2;
@property (weak, nonatomic) IBOutlet UIImageView *image3;
@property (weak, nonatomic) IBOutlet UIImageView *image4;
@property (weak, nonatomic) IBOutlet UIImageView *image5;
@property (weak, nonatomic) IBOutlet UILabel *heroName1;
@property (weak, nonatomic) IBOutlet UILabel *heroName2;
@property (weak, nonatomic) IBOutlet UILabel *heroName3;
@property (weak, nonatomic) IBOutlet UILabel *heroName4;
@property (weak, nonatomic) IBOutlet UILabel *heroName5;
@property (weak, nonatomic) IBOutlet UILabel *hero_per1;
@property (weak, nonatomic) IBOutlet UILabel *hero_per2;
@property (weak, nonatomic) IBOutlet UILabel *hero_per3;
@property (weak, nonatomic) IBOutlet UILabel *hero_per4;
@property (weak, nonatomic) IBOutlet UILabel *hero_per5;

@end

@implementation LLT_PlayerAlwaysUseHeroViewCell_LXM

-(void)setHeroArr:(NSMutableArray *)heroArr{
    if (_heroArr != heroArr) {
        _heroArr = nil;
        _heroArr = heroArr;
    }
    for (int i = 0; i < _heroArr.count; i ++) {
        LLT_PlayerLastUsedModel *hero = self.heroArr[i];
        switch (i) {
            case 0:{
                [self.img1 sd_setImageWithURL:[NSURL URLWithString:hero.hero_icon]];
                self.heroName1.text = hero.hero_name;
                self.hero_per1.text = hero.hero_per;
            }
                break;
            case 1:{
                [self.image2 sd_setImageWithURL:[NSURL URLWithString:hero.hero_icon]];
                self.heroName2.text = hero.hero_name;
                self.hero_per2.text = hero.hero_per;
            }
                break;
            case 2:{
                [self.image3 sd_setImageWithURL:[NSURL URLWithString:hero.hero_icon]];
                self.heroName3.text = hero.hero_name;
                self.hero_per3.text = hero.hero_per;
            }
                break;
            case 3:{
                [self.image4 sd_setImageWithURL:[NSURL URLWithString:hero.hero_icon]];
                self.heroName4.text = hero.hero_name;
                self.hero_per4.text = hero.hero_per;
            }
                break;
            case 4:{
                [self.image5 sd_setImageWithURL:[NSURL URLWithString:hero.hero_icon]];
                self.heroName5.text = hero.hero_name;
                self.hero_per5.text = hero.hero_per;
            }
                break;
            default:
                break;
        }
    }
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
